package socket.protocol;


/**
 * Created by bpb on 2020-07-17.
 * 说明：
 */
public abstract class IProtocolServer {
    public interface OnNeedCallback {
        void onConnectedStatusChanged(String srcKey, boolean connected, Exception e, String msg);

        void checkAction(String srcKey, int cmd, long receiveTime, byte... params);
    }

    public abstract void connect(int retryCount, Object... params);

    protected byte headerA = 0x33;
    protected byte headerB = 0x44;

    public abstract void disConnect();

    public abstract void sendData(String target, int cmd, byte[] bytes);
    OnNeedCallback onNeedCallback;

    public IProtocolServer(OnNeedCallback onNeedCallback) {
        this.onNeedCallback = onNeedCallback;
    }
}
